Skip to content

Instantly share code, notes, and snippets.

@kkweon
Created September 12, 2017 10:17
Show Gist options
  • Save kkweon/110d9ae4ac0abfe77e1c1fa5d1de5cdc to your computer and use it in GitHub Desktop.
Save kkweon/110d9ae4ac0abfe77e1c1fa5d1de5cdc to your computer and use it in GitHub Desktop.

Module Loading Test

module ModuleLoadingTest where

import Test.QuickCheck

data Fool = Fulse | Frue deriving (Eq, Show)

foolGen :: Gen Fool
foolGen = frequency [(2, return Fulse), (1, return Frue)]
:!ls -al
total 124
drwxrwxr-x  5 kkweon kkweon   4096 Sep 12 03:14 .
drwxrwxr-x 13 kkweon kkweon   4096 Sep 10 16:20 ..
-rw-rw-r--  1 kkweon kkweon    180 Sep 12 03:14 ModuleLoadingTest.hs
drwxrwxr-x  6 kkweon kkweon   4096 Sep 10 19:46 morse
drwxrwxr-x  2 kkweon kkweon   4096 Sep 12 03:14 src
drwxrwxr-x  4 kkweon kkweon   4096 Sep 10 17:45 Testing
lrwxrwxrwx  1 kkweon kkweon     36 Sep 12 03:14 .#Testing.org -> [email protected]:1505195625
-rw-rw-r--  1 kkweon kkweon 100574 Sep 12 03:14 Testing.org

module

:module + ModuleLoadingTest
<no location info>: error:
    Could not find module ‘ModuleLoadingTest’
    It is not a module in the current program, or in any known package.

import

import ModuleLoadingTest
<no location info>: error:
    Could not find module ‘ModuleLoadingTest’
    It is not a module in the current program, or in any known package.

:load

:load ModuleLoadingTest
[1 of 1] Compiling ModuleLoadingTest ( ModuleLoadingTest.hs, interpreted )
Ok, modules loaded: ModuleLoadingTest.
:load moduleloadingtest
target ‘moduleloadingtest’ is not a module name or a source file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment