Note that there are some explanatory texts on larger screens.

plurals
  1. POhaskell load module in list
    primarykey
    data
    text
    <p>Hey haskellers and haskellettes, is it possible to load a module functions in a list. in my concrete case i have a list of functions all checked with or</p> <pre><code>checkRules :: [Nucleotide] -&gt; Bool checkRules nucs = or $ map ($ nucs) [checkRule1, checkRule2] </code></pre> <p>i do import checkRule1 and checkRule2 from a seperate module - i don't know if i will need more of them in the future.</p> <p>i'd like to have the same functionality look something like</p> <pre><code>-- import all functions from Rules as rules where -- :t rules ~~&gt; [([Nucleotide] -&gt; Bool)] checkRules :: [Nucleotide] -&gt; Bool checkRules nucs = or $ map ($ nucs) rules </code></pre> <p>the program sorts Pseudo Nucleotide Sequences in viable and nonviable squences according to given rules. thanks in advance ε/2</p> <hr> <p>Addendum: So do i think right - i need:</p> <pre><code>genList :: File -&gt; TypeSignature -&gt; [TypeSignature] chckfun :: (a-&gt;b) -&gt; TypeSignature -&gt; Bool </code></pre> <p>at compile time. but i can't generate a list of all functions in the module - as they most probably will have not the same type signature and hence not all fit in one list. so i cannot filter given list with chckfun.</p> <ul> <li>In order to do this i either want to check the written type signatures in the source file (?) or the inferenced types given by the compiler(?).</li> <li><p>another problem that comes to my mind is: not every function written in the source file might get exported ?</p></li> <li><p>Is this a problem a haskell beginner should try to solve after 5 months of learning - my brain is shaped like a klein's bottle after all this "compile time thinking".</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload