code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveDataTypeable #-}
module Transient.EVars where
import Transient.Base
import Transient.Internals(runTransState,onNothing, EventF(..), killChildren)
import qualified Data.Map as M
import Data.Typeable
import Control.Concurrent
import Control.Applicative
import Control.Concurrent.STM
import Control.Mon... | agocorona/transient | src/Transient/EVars.old.hs | mit | 5,308 | 0 | 18 | 1,390 | 1,096 | 558 | 538 | 85 | 5 |
module Issue215A where
import Issue215.B
main = print $ f 2
| fpco/fay | tests/Issue215A.hs | bsd-3-clause | 62 | 0 | 6 | 13 | 21 | 12 | 9 | 3 | 1 |
{-# OPTIONS -cpp #-}
------------------------------------------------------------------
-- A primop-table mangling program --
------------------------------------------------------------------
module Main where
import Parser
import Syntax
import Data.Char
import Data.List
import Data.May... | TomMD/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | 36,808 | 0 | 39 | 14,592 | 9,909 | 4,989 | 4,920 | 686 | 74 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.SrcDist
-- Copyright : Simon Marlow 2004
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This handles the @sdist@ command. The module exports a... | kolmodin/cabal | Cabal/Distribution/Simple/SrcDist.hs | bsd-3-clause | 19,380 | 0 | 24 | 5,097 | 3,944 | 2,014 | 1,930 | 322 | 6 |
{-# LANGUAGE CPP, RankNTypes #-}
import Control.Concurrent.Async
import Control.Monad
import System.Environment
import Control.Concurrent.Chan
import Control.Concurrent.STM
-- The TQueue and TBQueue in the stm package are optimised with UNPACKs,
-- so we measure with those rather than these local versions.
--
-- impo... | prt2121/haskell-practice | parconc/chanbench.hs | apache-2.0 | 1,804 | 0 | 17 | 411 | 350 | 180 | 170 | 28 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.Parsec.Error
-- Copyright : (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Portability... | maurer/15-411-Haskell-Base-Code | src/Text/ParserCombinators/Parsec/Error.hs | bsd-3-clause | 1,009 | 0 | 6 | 205 | 122 | 85 | 37 | 23 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE AutoDeriveTypeable, BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.QSem
-- Copyright : (c) The University of Glasgow 2001
-- License : BS... | frantisekfarka/ghc-dsi | libraries/base/Control/Concurrent/QSem.hs | bsd-3-clause | 4,346 | 0 | 19 | 1,156 | 810 | 448 | 362 | 60 | 5 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, BangPatterns #-}
-- |
-- Module : Data.Vector.Mutable
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portable
--
-- M... | mightymoose/liquidhaskell | benchmarks/vector-0.10.0.1/Data/Vector/Mutable.hs | bsd-3-clause | 12,569 | 0 | 19 | 3,114 | 3,075 | 1,605 | 1,470 | 221 | 2 |
-- An example of RelaxedPolyRec in action which came up
-- on Haskell Cafe June 2010 (Job Vranish)
module Foo where
import Data.Maybe
-- The fixed point datatype
data Y f = Y (f (Y f))
-- Silly dummy function
maybeToInt :: Maybe a -> Int
maybeToInt = length . maybeToList
---------------------------
... | siddhanathan/ghc | testsuite/tests/typecheck/should_compile/PolyRec.hs | bsd-3-clause | 738 | 0 | 10 | 185 | 157 | 86 | 71 | 10 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.DocumentAndElementEventHandlers
(copy, cut, paste, beforeCopy, beforeCut, beforeinput, beforePaste,
Docum... | ghcjs/jsaddle-dom | src/JSDOM/Generated/DocumentAndElementEventHandlers.hs | mit | 3,613 | 0 | 7 | 451 | 599 | 361 | 238 | 50 | 1 |
module Main where
import qualified PactSpec as P
import qualified ServiceSpec as S
main :: IO ()
main = P.main >> S.main >> return () | mannersio/manners | cli/test/Main.hs | mit | 135 | 0 | 7 | 26 | 48 | 29 | 19 | 5 | 1 |
module GHCJS.DOM.XMLHttpRequestProgressEvent (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/XMLHttpRequestProgressEvent.hs | mit | 57 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Wobsurv.TemplateModels.Index where
import BasePrelude
import Data.Text (Text)
import Data.ByteString (ByteString)
data Index =
Index {
path :: Text,
contents :: [Text]
}
deriving (Show, Data, Typeable)
| nikita-volkov/wobsurv | library/Wobsurv/TemplateModels/Index.hs | mit | 227 | 0 | 9 | 45 | 69 | 42 | 27 | 9 | 0 |
import Sound.VAD.WebRTC
main = create | chpatrick/haskell-webrtc-vad | src/Test.hs | mit | 38 | 0 | 4 | 5 | 12 | 7 | 5 | 2 | 1 |
module Y2017.M11.D01.Exercise where
{--
So, yesterday, we read in source NYT article archives and scanned them. We've
saved the special characters, and then, manually, we've provided the
replacement ASCII equivalents, where applicable.
Now what?
First, let's read in that file of special characters into a memoizing ... | geophf/1HaskellADay | exercises/HAD/Y2017/M11/D01/Exercise.hs | mit | 3,932 | 0 | 10 | 631 | 298 | 174 | 124 | 26 | 1 |
import Control.Monad.State
--import Control.Monad.Identity
test1 :: State int int
test1 = do -- fuck
a <- get
-- modify (+1)
-- b <- get
return (a+1) | Muzietto/transformerz | haskell/sigfpe/grok_1.hs | mit | 154 | 0 | 9 | 30 | 46 | 25 | 21 | 5 | 1 |
module PhotoClassifier ( processDir
,DateStuff
,toDateStuffFromString )
where
import System.IO
import System.Directory
import System.FilePath.Posix
import System.Posix.Files
import System.Environment
import Graphics.Exif
import Data.String.Utils
import Data.Time.Calend... | neurogeek/photo-classifier | PhotoClassifier.hs | mit | 5,163 | 0 | 18 | 1,983 | 1,414 | 722 | 692 | 90 | 1 |
module Db.Course (selectCourse, selectCourses,
insertCourse, insertCourses,
deleteCourses) where
import Database.Persist.Postgresql (Entity (..), Filter, (==.), (>.), insertMany_,
selectFirst, selectList, insert, deleteWhere,... | SebastianCallh/liu-courses | src/Db/Course.hs | mit | 1,080 | 0 | 11 | 309 | 319 | 167 | 152 | 26 | 1 |
-- Demo
myDrop n xs = if n <= 0 || null xs
then xs
else myDrop (n - 1) (tail xs)
lastButOne = last . init
| zhangjiji/real-world-haskell | ch2.hs | mit | 136 | 0 | 8 | 57 | 58 | 30 | 28 | 4 | 2 |
module TerminationChecker where
import Expr
import TypeChecker
import Data.List
import Data.Maybe
import Control.Monad
import Control.Monad.Error
import Control.Monad.Reader
import Control.Monad.Identity
-- General functions
-- | Finds the sublist starting from the first element for which the predicate holds.
subLis... | tdidriksen/copatterns | src/findus/TerminationChecker.hs | mit | 30,030 | 148 | 26 | 9,367 | 10,186 | 5,286 | 4,900 | 491 | 18 |
-- | Tests some properties against Language.TaPL.TypedBoolean.
module Language.TaPL.TypedBoolean.Tests where
import Control.Applicative ((<$>))
import Test.QuickCheck (quickCheck)
import Text.Printf (printf)
import Language.TaPL.ShowPretty (showp)
import Language.TaPL.TypedBoolean (Term, parseString, eval, eval', typ... | zeckalpha/TaPL | src/Language/TaPL/TypedBoolean/Tests.hs | mit | 2,205 | 0 | 10 | 407 | 480 | 261 | 219 | 34 | 2 |
-----------------------------------------------------------
---- |
---- Module: SpaceAge
---- Description: Calculate age on a different planets of Solar system
---- Copyright: (c) 2015 Alex Dzyoba <alex.dzyoba@gmail.com>
---- License: MIT
-------------------------------------------------------------
module SpaceAge wh... | dzeban/haskell-exercism | space-age/haskell/space-age/SpaceAge.hs | mit | 880 | 0 | 6 | 137 | 199 | 105 | 94 | 11 | 1 |
{-|
Module : Sivi.GCode.Base
Description : GCode data structure
Copyright : (c) Maxime ANDRE, 2015
License : GPL-2
Maintainer : iemxblog@gmail.com
Stability : experimental
Portability : POSIX
-}
module Sivi.GCode.Base
(
GCode(..)
, GCodeInstruction(..)
,... | iemxblog/sivi-haskell | src/Sivi/GCode/Base.hs | gpl-2.0 | 6,508 | 0 | 16 | 2,295 | 2,029 | 1,080 | 949 | 128 | 1 |
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN"
"http://java.sun.com/products/javahelp/helpset_1_0.dtd">
<helpset version="2.0">
<!-- title -->
<title>Hilfe zum Modul zum EM-Algorithmus</title>
<!-- maps -->
<maps>
<... | jurkov/j-algo-mod | res/module/em/help/jhelp/em_help.hs | gpl-2.0 | 1,628 | 124 | 90 | 216 | 651 | 325 | 326 | -1 | -1 |
module Main where
data Term = Arg Integer
| Abs Term
| App Term Term
instance Show Term where
show (Arg n) = show n
show (Abs t) = "λ. " ++ show t
show (App t1 t2) = "(" ++ show t1 ++ " " ++ show t2 ++ ")"
shift :: Integer -> Integer -> Term -> Term
shift d c t = case t of
arg@(Arg n)... | andbroby/444-untyped-lambda | src/Main.hs | gpl-2.0 | 961 | 2 | 15 | 329 | 553 | 277 | 276 | 31 | 4 |
-- Copyright 2017 Marcelo Garlet Millani
-- This file is part of pictikz.
-- pictikz is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later v... | mgmillani/pictikz | src/Pictikz/Parser.hs | gpl-3.0 | 1,445 | 0 | 17 | 306 | 446 | 238 | 208 | 27 | 2 |
module FAunion
( unionTNFA
)
where
import Set
import FiniteMap
import Stuff
import Options
import TA
import FAtypes
import Ids
import FAmap
import FAcmpct
import FAconv
---------------------------------------------------------------------
unionTNFA :: Opts -> TNFA Int -> TNFA Int -> TNFA Int
unionTNFA opts x1 ... | jwaldmann/rx | src/FAunion.hs | gpl-3.0 | 1,372 | 34 | 13 | 284 | 316 | 178 | 138 | 29 | 1 |
{-# OPTIONS_GHC -Wall #-}
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import Distribution.PackageDescription
import System.Process
import System.Exit
import Control.Exception
import Data.List
import Data.Either
import Data.Char
import Data.Time.Clock
import qu... | guoy34/ampersand | Setup.hs | gpl-3.0 | 9,915 | 6 | 22 | 2,228 | 1,703 | 921 | 782 | 157 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-vision/gen/Network/Google/Resource/Vision/Images/Annotate.hs | mpl-2.0 | 5,149 | 0 | 18 | 1,302 | 857 | 497 | 360 | 120 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Create.hs | mpl-2.0 | 3,163 | 0 | 14 | 755 | 387 | 234 | 153 | 63 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-binaryauthorization/gen/Network/Google/Resource/BinaryAuthorization/Projects/Policy/SetIAMPolicy.hs | mpl-2.0 | 5,805 | 0 | 16 | 1,221 | 782 | 458 | 324 | 116 | 1 |
module Data.Map.Debug where
import Data.Map (Map)
import qualified Data.Map as Map
(!) :: (Show k,Ord k) => Map k a -> k -> a
(!) mp key = case Map.lookup key mp of
Nothing -> error $ "Key "++show key++" not found in map "++show (Map.keys mp)
Just r -> r
| hguenther/nbis | Data/Map/Debug.hs | agpl-3.0 | 261 | 0 | 12 | 57 | 128 | 69 | 59 | 7 | 2 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-
Copyright 2018 The CodeWorld Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apac... | tgdavies/codeworld | funblocks-client/src/Blockly/Generator.hs | apache-2.0 | 774 | 0 | 5 | 140 | 26 | 17 | 9 | 4 | 0 |
{-
- Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io>
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless requir... | theam/haskell-do | src/common/HaskellDo/Toolbar/View.hs | apache-2.0 | 7,716 | 0 | 21 | 1,770 | 1,887 | 911 | 976 | 123 | 3 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : Opengl.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:30
Warning : this file is machine generated - do not mo... | keera-studios/hsQt | Qtc/ClassTypes/Opengl.hs | bsd-2-clause | 10,945 | 0 | 12 | 1,460 | 3,171 | 1,644 | 1,527 | -1 | -1 |
module Data.List.Statistics
(
mean, median, standardDeviation
)
where
import qualified Data.List as DL
mean :: Fractional a => [a] -> a
mean xs = DL.sum xs / fromIntegral (length xs)
median :: (Fractional a, Ord a) => [a] -> a
median xs = if even len
then avgMiddle
else middleEl... | thomaschrstnsn/DaytumStats | src/Data/List/Statistics.hs | bsd-3-clause | 722 | 0 | 11 | 217 | 271 | 145 | 126 | 20 | 2 |
{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-}
#if __GLASGOW_HASKELL__ > 702
{-# LANGUAGE DefaultSignatures, OverloadedStrings, ScopedTypeVariables, TypeOperators #-}
#endif
module Web.Routes.PathInfo
( stripOverlap
, stripOverlapBS
, stripOverlapText
, URLParser
, pToken
, segm... | shockkolate/web-routes | Web/Routes/PathInfo.hs | bsd-3-clause | 11,425 | 0 | 15 | 2,591 | 2,482 | 1,367 | 1,115 | 126 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving, CPP, QuasiQuotes, TypeFamilies, FlexibleInstances,
MultiParamTypeClasses #-}
-- | This module provides functions for using Markdown with Yesod. An example pipeline could be
--
-- > (writePandoc defaultWriterOptions <$>) . localLinks . parseMarkdown defaultParserSta... | ajdunlap/yesod-markdown | Yesod/Markdown.hs | bsd-3-clause | 3,646 | 0 | 14 | 631 | 741 | 413 | 328 | 62 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import IndexedSet
import Criterion.Main
import Criterion.Config
import qualified Criterion.MultiMap as M
import Data.Set (Set)
import qualified Data.Set as S
import Control.DeepSeq
data Person = Person { name :: String
, age :: Int
... | ArnoVanLumig/indexedset | Benchmark.hs | bsd-3-clause | 1,441 | 0 | 11 | 379 | 500 | 265 | 235 | 35 | 1 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Graphics.UI.Threepenny.Widgets.DataTable where
import Prelude hiding (id,(.))
import Control.Category
import Graphics.UI.Thre... | kylcarte/threepenny-extra | src/Graphics/UI/Threepenny/Widgets/DataTable.hs | bsd-3-clause | 5,567 | 0 | 17 | 1,469 | 1,822 | 955 | 867 | 168 | 2 |
-- | A demo to show that a tail-recursive function will not increase
-- the JavaScript stack.
--
-- More future work for TCO to be done here.
module Demo.Tailrecursive where
import Language.Fay.FFI
import Language.Fay.Prelude
main :: Fay ()
main = do
benchmark
benchmark
benchmark
benchmark
benchmark :: Fay ... | faylang/fay-server | modules/project/Demo/Tailrecursive.hs | bsd-3-clause | 741 | 0 | 12 | 151 | 231 | 119 | 112 | 24 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.CSL.Data
-- Copyright : (c) John MacFarlane
-- License : BSD-style (see LICENSE)
--
-- Maintainer : John MacFarlane <fiddlosopher@gmail.com>
-- Sta... | jkr/pandoc-citeproc | src/Text/CSL/Data.hs | bsd-3-clause | 3,926 | 0 | 22 | 1,099 | 894 | 529 | 365 | 77 | 4 |
module Haseem.Analysis.Config where
import Haseem.Types
import Haseem.Monad
| badi/haseem | Haseem/Analysis/Config.hs | bsd-3-clause | 78 | 0 | 4 | 9 | 17 | 11 | 6 | 3 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE BangPatterns
, CPP
, ExistentialQuantification
, NoImplicitPrelude
, RecordWildCards
, TypeSynonymInstances
, FlexibleInstances
#-}
module GHC.Event.Manager
( -- * Types
EventManager
-- * Creat... | spacekitteh/smcghc | libraries/base/GHC/Event/Manager.hs | bsd-3-clause | 16,308 | 0 | 23 | 4,278 | 4,121 | 2,136 | 1,985 | -1 | -1 |
{-# LANGUAGE CPP #-}
module Distribution.Client.Dependency.Modular.Preference
( avoidReinstalls
, deferSetupChoices
, deferWeakFlagChoices
, enforceManualFlags
, enforcePackageConstraints
, enforceSingleInstanceRestriction
, firstGoal
, lpreferEasyGoalChoices
, preferBaseGoalChoice
... | edsko/cabal | cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | 16,047 | 0 | 21 | 4,501 | 3,848 | 1,981 | 1,867 | 219 | 5 |
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
------------------... | tejon/diagrams-contrib | src/Diagrams/TwoD/Layout/Tree.hs | bsd-3-clause | 25,728 | 6 | 18 | 7,108 | 5,114 | 2,865 | 2,249 | 237 | 3 |
-- | A term index to accelerate matching.
-- An index is a multimap from terms to arbitrary values.
--
-- The type of query supported is: given a search term, find all keys such that
-- the search term is an instance of the key, and return the corresponding
-- values.
{-# LANGUAGE BangPatterns, RecordWildCards, Overlo... | nick8325/kbc | src/Twee/Index.hs | bsd-3-clause | 11,519 | 0 | 19 | 3,203 | 3,123 | 1,665 | 1,458 | -1 | -1 |
module Prime
(
primes,
factorize
)
where
primes = 2 : oddPrimes
oddPrimes = 3 : primeGen 5
primeGen q =
if (q ==) . fst . head $ factorize' q oddPrimes
then q : primeGen (q + 2)
else primeGen (q + 2)
factorize n = factorize' n primes
factorize' 1 _ = []
factorize' n [] = [(n, 1)... | cullina/Extractor | src/Prime.hs | bsd-3-clause | 659 | 0 | 10 | 249 | 306 | 163 | 143 | 24 | 3 |
module Main where
import Graphics.ChalkBoard as CB
import Control.Applicative (pure)
main = startChalkBoard [BoardSize (400) (400)] animMain
animMain cb = do
--Set up the animations
let triangle345 = pure $ choose (alpha black) transparent <$> triangle (0,0) (0,-0.3) (0.4,-0.3) :: Active (Board (RG... | andygill/chalkboard2 | tests/triAnim/Main.hs | bsd-3-clause | 5,591 | 8 | 23 | 1,663 | 2,233 | 1,167 | 1,066 | 71 | 4 |
module B.Shake.Timing(resetTimings, addTiming, printTimings) where
import Control.Arrow
import Data.IORef
import Data.Time
import System.IO.Unsafe
import Numeric
{-# NOINLINE timings #-}
timings :: IORef [(UTCTime, String)] -- number of times called, newest first
timings = unsafePerformIO $ newIORef []
resetTimin... | strager/b-shake | B/Shake/Timing.hs | bsd-3-clause | 1,924 | 0 | 14 | 483 | 859 | 451 | 408 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- | Features list.
module HL.V.Home.Features where
import HL.V hiding (list)
-- | Features section explains what's notable about Haskell as a
-- language.
features :: Html
features =
div ! class_ "features" $
(container
(do h1 "... | chrisdone/hl | src/HL/V/Home/Features.hs | bsd-3-clause | 3,250 | 0 | 15 | 830 | 335 | 158 | 177 | 45 | 1 |
module Compiler.Util where
import Data.Char
import LLVM.AST
import LLVM.AST.AddrSpace
import qualified Language.MiniStg as STG
int :: Type
int = IntegerType 64
intptr :: Type
intptr = PointerType int (AddrSpace 0)
intintfunc :: Type
intintfunc = FunctionType int [int] False
intintfptr :: Type
intintfptr = PointerT... | Neuromancer42/ministgwasm | src/Compiler/Util.hs | bsd-3-clause | 2,073 | 0 | 12 | 447 | 565 | 298 | 267 | 57 | 6 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Cheapskate.Terminal
( -- * Rendering markdown to the terminal
prettyPrint
, renderTerminal
, renderIO
-- * Options
, PrettyPrintOptions(..)
, def
, ... | yamadapc/cheapskate-terminal | src/Cheapskate/Terminal.hs | bsd-3-clause | 9,433 | 0 | 23 | 3,064 | 2,400 | 1,253 | 1,147 | 188 | 11 |
module Sgf.XMonad.Util.Run
( spawnPipe'
, spawnPID'
, spawn'
, executeFileWithPATH
, spawnPipeWithPATH'
, spawnPIDWithPATH'
, spawnWithPATH'
)
where
import XMonad.Core
import System.IO
import System.Posix.IO
import System.Posix.Process (executeFile)
import System.Posix.Types (Proces... | sgf-dma/sgf-xmonad-modules | src/Sgf/XMonad/Util/Run.hs | bsd-3-clause | 2,795 | 0 | 13 | 964 | 736 | 377 | 359 | 54 | 1 |
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE PackageImports #-}
module Draw (draw) where
import Brick
import Draw.DeleteChannelConfirm
import Draw.JoinChannel
import Draw.LeaveChannelConfirm
import Draw.Main
import Draw.PostListOverlay
import Draw.ShowHelp
import Draw.UserListOverlay
import Draw.ViewMessage
import Types
... | aisamanra/matterhorn | src/Draw.hs | bsd-3-clause | 1,126 | 0 | 8 | 359 | 214 | 107 | 107 | 29 | 13 |
{-# LANGUAGE Rank2Types #-}
-- Create Ramses build script.
--
-- (c) 2015 Galois, Inc.
--
module Tower.AADL.Build.Common where
import Data.Char
import Data.Maybe (maybeToList, fromMaybe)
import System.FilePath
import Text.PrettyPrint.Leijen hiding ((</>))
import Ivory.Artifact
import Ivory.Tower
import qualified Iv... | GaloisInc/tower | tower-aadl/src/Tower/AADL/Build/Common.hs | bsd-3-clause | 4,545 | 0 | 13 | 849 | 1,327 | 704 | 623 | 109 | 1 |
{-# LANGUAGE Trustworthy #-}
-- |
-- Module : Codec.Dvorak
-- Description : Dvorak encoding for Haskell.
-- Copyright : (c) Kyle Van Berendonck, 2014
-- License : BSD3
-- Maintainer : kvanberendonck@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- This module exposes all the API for... | kvanberendonck/codec-dvorak | src/Codec/Dvorak.hs | bsd-3-clause | 1,690 | 0 | 8 | 319 | 245 | 142 | 103 | 28 | 2 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Author
( AuthorId(..)
, Author(..)
, AuthorQueryCondition(..)
, AuthorList(..)
) where
import Data.Aeson
import Data.Text (Text, unpack)
import Data.Time (UTCTime)
import Data.Time.Calendar
import Data.Typeable
im... | cutsea110/servant-sample-book | src/Author.hs | bsd-3-clause | 1,940 | 0 | 10 | 677 | 470 | 274 | 196 | 47 | 0 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-------------------------------------------------------------------------------
-- | Thi... | derekelkins/servant-docs | src/Servant/Docs.hs | bsd-3-clause | 19,057 | 0 | 20 | 4,738 | 3,298 | 1,886 | 1,412 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE RecordWildCards #-}
module IOCP.Manager (
-- * Manager
Manager,
new,
getSystemManager,
-- * Overlapped I/O
associateHandle,
withOverlapped,
StartCallback,
CompletionCallback,
... | joeyadams/haskell-iocp | IOCP/Manager.hs | bsd-3-clause | 12,352 | 4 | 27 | 3,405 | 2,795 | 1,453 | 1,342 | 243 | 3 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Core.Content
( -- * Content
Content (..)
, emptyContent
, ToContent (..)
... | s9gf4ult/yesod | yesod-core/Yesod/Core/Content.hs | mit | 10,363 | 0 | 10 | 1,754 | 2,383 | 1,291 | 1,092 | 222 | 2 |
{-|
Module : Veca.Operations
Description : Functions for VECA
Copyright : (c) 2017 Pascal Poizat
License : Apache-2.0 (see the file LICENSE)
Maintainer : pascal.poizat@lip6.fr
Stability : experimental
Portability : unknown
-}
module Veca.Operations
(
-- * model transformation
cToCTree
, cToTA
... | pascalpoizat/vecahaskell | src/Veca/Operations.hs | apache-2.0 | 16,330 | 22 | 23 | 6,046 | 4,532 | 2,309 | 2,223 | 305 | 4 |
module Futhark.CodeGen.ImpGen.OpenCL
( compileProg
) where
import Control.Applicative
import Prelude
import Futhark.Representation.ExplicitMemory (Prog)
import qualified Futhark.CodeGen.ImpCode.OpenCL as OpenCL
import qualified Futhark.CodeGen.ImpGen.Kernels as ImpGenKernels
import Futhark.CodeGen.ImpGen.Kernels... | CulpaBS/wbBach | src/Futhark/CodeGen/ImpGen/OpenCL.hs | bsd-3-clause | 521 | 0 | 10 | 55 | 116 | 70 | 46 | 11 | 1 |
module AST.Module
( Interfaces
, Types, Aliases, ADTs
, AdtInfo, CanonicalAdt
, SourceModule, ValidModule, CanonicalModule, Optimized
, Module(..), Body(..)
, Header(..)
, Interface(..), toInterface
, UserImport, DefaultImport, ImportMethod(..)
) where
import Control.Applicative ((<... | Axure/elm-compiler | src/AST/Module.hs | bsd-3-clause | 3,762 | 0 | 14 | 918 | 1,121 | 661 | 460 | 105 | 1 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
{-
virtual-dom bindings demo, rendering a large pixel grid with a bouncing red
square. the step and patch are calculated asynchronously, the update is
batched in an animation frame
-}
module Main where
import Prelude hiding (div)
import Cont... | wavewave/ghcjs-vdom | example/Example.hs | mit | 3,159 | 0 | 13 | 906 | 1,189 | 636 | 553 | 93 | 5 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (filterM, when)
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as L8
import Data.List ... | feuerbach/stackage | stackage-upload.hs | mit | 6,476 | 0 | 21 | 2,466 | 1,234 | 665 | 569 | 153 | 4 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
HsTypes: Abstract syntax: user-defined types
-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstance... | alexander-at-github/eta | compiler/ETA/HsSyn/HsTypes.hs | bsd-3-clause | 39,207 | 0 | 15 | 10,353 | 6,907 | 3,708 | 3,199 | 431 | 6 |
{-# LANGUAGE TypeInType, RankNTypes, TypeFamilies #-}
module T12742 where
import Data.Kind
type family F :: forall k2. (k1, k2)
data T :: (forall k2. (Bool, k2)) -> Type
type S = T F
| ezyang/ghc | testsuite/tests/dependent/should_compile/T12742.hs | bsd-3-clause | 188 | 0 | 8 | 38 | 62 | 39 | 23 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ru-RU">
<title>График вызовов </title>
<maps>
<homeID>callgraph</homeID>
<mapref locati... | thc202/zap-extensions | addOns/callgraph/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 1,012 | 77 | 66 | 158 | 485 | 243 | 242 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Clean a project.
module Stack.Clean
(clean
,CleanOpts(..)
,StackCleanException(..)
) where
import Stack.Prelude
im... | MichielDerhaeg/stack | src/Stack/Clean.hs | bsd-3-clause | 2,963 | 0 | 18 | 725 | 621 | 326 | 295 | 56 | 4 |
{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
module T3078 where
data T = A Int | B Int
funny :: T -> Int
funny t = n
where
n | A x <- t = x
| B x <- t = x
| ezyang/ghc | testsuite/tests/pmcheck/should_compile/T3078.hs | bsd-3-clause | 237 | 0 | 11 | 66 | 73 | 38 | 35 | 8 | 1 |
{-# OPTIONS -fno-warn-redundant-constraints #-}
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleInstances #-}
-- Test Trac #2856
module T2856 where
import Data.Ratio
----------------------
class C a where
data D a
instance C Bool where
newtype D Bool = DInt Int deriving (... | urbanslug/ghc | testsuite/tests/deriving/should_compile/T2856.hs | bsd-3-clause | 766 | 0 | 8 | 144 | 226 | 125 | 101 | 15 | 0 |
module TidyClash where
-- Type variables originating from wildcards are normally given the name w_,
-- but in this case there is already a type variable called w_. Tidying the
-- types should result in w_1 and w_2 for the two new type variables
-- originating from the wildcards.
bar :: w_ -> (w_, _ -> _)
bar x = (x, ... | siddhanathan/ghc | testsuite/tests/partial-sigs/should_fail/TidyClash.hs | bsd-3-clause | 337 | 0 | 7 | 66 | 46 | 29 | 17 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Models.LegacyJson
( Period(..)
, PlayoffSeed(..)
, Game(..)
, Event(..)
, PlayoffsResponse(..)
) where
import Data.Char as Char
import Data.List as List
import Hockey.Database
import Hockey.Formatting
(formattedGame, formatt... | petester42/haskell-hockey | web/Models/LegacyJson.hs | mit | 2,719 | 0 | 13 | 706 | 659 | 372 | 287 | 83 | 0 |
{-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE ExistentialQuantification, FlexibleContexts #-}
-- |
--
-- Module : EventProbability
-- Description : Events and probabilities.
-- License : MIT
--
-- Definitions for events and probabilities.
--
module EventProbability (
-- * Events
Event(..)
, Eve... | fehu/min-dat--naive-bayes | src/EventProbability.hs | mit | 5,037 | 0 | 10 | 1,366 | 1,238 | 669 | 569 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
module Control.Coroutine.FRP where
import qualified Control.Category as C
import Control.Arrow
import Control.Applicative (liftA2)
import Data.Monoid
import Data.List (foldl')
import Control.Coroutine
import qualified Data.IntMap as IntMap
type Event a = [a]
edge :: Eq a => Coroutine ... | shangaslammi/frp-pong | Control/Coroutine/FRP.hs | mit | 2,788 | 0 | 15 | 712 | 1,347 | 707 | 640 | 70 | 2 |
import Data.List (permutations, sort)
import Data.Char (intToDigit)
main :: IO ()
main = do
putStr $ map intToDigit list
where list = (sort . permutations $ [0..9]) !! 999999
| DestructHub/ProjectEuler | Problem024/Haskell/solution_1.hs | mit | 186 | 0 | 10 | 40 | 78 | 42 | 36 | 6 | 1 |
module TestDemoNeuron where
import Test.Hspec
import AI.DemoNeuron
import TestNeuron
testDemoNeuron :: IO ()
testDemoNeuron = hspec $ do
describe "Reduced Neuron" $ do
it "should pass tests" $ do
True `shouldBe` True
describe "L2 Neuron" $ do
it "should pass tests" $ do
True `shouldBe` True
| qzchenwl/LambdaNet | test/TestDemoNeuron.hs | mit | 320 | 0 | 14 | 74 | 94 | 47 | 47 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : <File name or $Header$ to be replaced automatically>
Description : <optional short text displayed on contents page>
Copyright : (c) <Authors or Affiliations>
License : <license>
Maintainer : <email>
Stability : unstable | experimental | provisiona... | slogsdon/url | src/App.hs | mit | 633 | 0 | 8 | 138 | 57 | 34 | 23 | 7 | 1 |
module GUBS.Solver.ZThree (zthree) where
import GUBS.Algebra
import qualified GUBS.Expression as E
import qualified GUBS.MaxPolynomial as MP
import GUBS.Solver.Class
import qualified GUBS.Solver.Formula as F
import Control.Monad.State.Strict
import ... | mzini/gubs | src/GUBS/Solver/ZThree.hs | mit | 2,394 | 0 | 11 | 667 | 885 | 451 | 434 | -1 | -1 |
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
--------------------------------------------------------------------------------
-- |
-- Module : System.Socket.Internal.Socket
-- Copyright : (c) Lars Petersen 2015
-- License : MIT
--
-- Maintainer : info@lars-petersen.net
-- Stability : experimental
... | lpeterse/haskell-socket | src/System/Socket/Internal/Socket.hs | mit | 4,681 | 0 | 8 | 872 | 221 | 161 | 60 | 19 | 0 |
module Faorien.Pathfinding ( BoardMap
, HeroBoardMap
, buildBoardMap
, buildSafeBoardMap
, buildEmptyBoardMap
, distance
, walk
) w... | ksaveljev/vindinium-bot | Faorien/Pathfinding.hs | mit | 7,486 | 0 | 16 | 1,710 | 1,812 | 975 | 837 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANG... | bennofs/hdevtools | src/CommandLoop.hs | mit | 16,938 | 0 | 22 | 3,983 | 4,968 | 2,444 | 2,524 | -1 | -1 |
module Quark.Colors where
import Quark.Types
-- Color IDs
defaultBg = (-1) :: Int
defaultColor = (-1) :: Int
black = 0 :: Int
red = 1 :: Int
green = 2 :: Int
orange = 3 :: Int
blue = 4 :: Int
purple = 5 :: Int
teal = 6 :: Int
lightGray = 7 :: Int
darkGray =... | sjpet/quark | src/Quark/Colors.hs | mit | 4,296 | 0 | 17 | 1,825 | 1,436 | 833 | 603 | 92 | 6 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Types.Checklist where
import Types.Imports
data Checklist = Checklist { checklistId :: Maybe Int,
listOwner :: Int,
checklistItems :: [ChecklistItem]} deriving (Show, Generic)
instance FromRow Checklist where
fromRow = Checklist <$... | maciejspychala/haskell-server | src/Types/Checklist.hs | mit | 1,882 | 0 | 13 | 417 | 522 | 272 | 250 | 46 | 1 |
-- Function with one argument
doubleMe x = x + x
-- Function with two arguments
doubleUs x y = x*2 + y*2
-- Function with if
doubleSmallNumber x = if x > 100
then x
else x*2
-- if is an expression!
doubleSmallNumberAndAddOne x = (if x > 100 then x else x*2) + 1
-- in the ghci, you would need to do: ... | fabriceleal/learn-you-a-haskell | 02/startingout.hs | mit | 1,877 | 4 | 11 | 389 | 774 | 452 | 322 | 29 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-- sass
sassCompiler :: Compiler (Item String)
sassCompiler =
getResourceString
>>= withItemBody (unixFilter "sass" ["-s", "-scss"]) -- "--sitemap"
>>= return . fmap compressCss | dled/inre | src/Inre/Compilers.hs | mit | 232 | 2 | 11 | 46 | 57 | 30 | 27 | 6 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Functionality.Explicit.Configuration where
import Control.Applicative ((<$>))
import Data.Aeson (Value (String))
import Data.... | mdorman/couch-simple | test/Functionality/Explicit/Configuration.hs | mit | 2,307 | 0 | 13 | 711 | 420 | 234 | 186 | 33 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Firestone.GameBuilder ( buildGame
, baseGam... | Jinxit/firestone | src/Firestone/GameBuilder.hs | mit | 2,581 | 0 | 12 | 762 | 714 | 367 | 347 | -1 | -1 |
-- Intermission: Exercises
-- 1. It is probably clear to you why you wouldn’t put an otherwise in your
-- top-most guard, but try it with avgGrade anyway and see what happens. It’ll
-- be more clear if you rewrite it as an actual otherwise match: | otherwise =
-- 'F'. What happens now if you pass a 90 as an argument? ... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/07_07.hs | mit | 1,444 | 0 | 9 | 327 | 153 | 87 | 66 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Danibot.Slack.API (
AuthToken
, startRTM
) where
import Control.Lens
import Data.Aeson (Value(..),fromJSON,toJSON,Result(Error,Success))
import Data.Aeson.Lens
import Data.Text (Text)
import qualified Data.Monoid.Textual as Textual
import qualifi... | danidiaz/danibot | lib/Network/Danibot/Slack/API.hs | mit | 1,423 | 0 | 13 | 378 | 415 | 227 | 188 | -1 | -1 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.WishHandler where
import Import
import Handler.WishList
postWishHandlerR :: Text -> AccessLevel -> WishId -> Handler Html
postWishHandlerR listUrl Admin wishId = do
(listId, _) <- getWishlist listUrl Admin
wish <- runDB $ get wishId
render <... | lulf/wishsys | Handler/WishHandler.hs | mit | 1,853 | 0 | 15 | 478 | 533 | 259 | 274 | 46 | 4 |
{-# LANGUAGE TemplateHaskell #-}
module CounterBot where
import qualified Data.Text as T (pack)
import Web.Slack
import Web.Slack.Message
import System.Environment (lookupEnv)
import Data.Maybe (fromMaybe)
import Control.Applicative
import Control.Lens
myConfig :: String -> SlackConfig
myConfig apiToken = SlackCon... | madjar/slack-api | example/CounterBot.hs | mit | 944 | 0 | 11 | 212 | 257 | 137 | 120 | -1 | -1 |
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
#if MIN_VERSION_classy_prelude(1, 0, 0)
import ClassyPrelude as X hiding (delete, deleteBy, Handler)
#else
import ClassyPrelude as X hiding (delete, deleteBy)
#endif
import Da... | frt/happyscheduler | test/TestImport.hs | mit | 2,979 | 0 | 14 | 846 | 670 | 349 | 321 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : I... | jaccokrijnen/leksah | src/IDE/Pane/Modules.hs | gpl-2.0 | 69,143 | 5 | 34 | 25,445 | 17,800 | 8,774 | 9,026 | 1,288 | 12 |
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE DeriveGeneric #-}
-------------------------------------------------------------------------------
-- |
-- Module : OpenSandbox.Protocol.Packet
-- Copyright : (c) 2016 Michael Carpenter
... | oldmanmike/opensandbox | src/OpenSandbox/Protocol/Packet.hs | gpl-3.0 | 35,952 | 0 | 21 | 9,093 | 10,270 | 4,688 | 5,582 | 1,062 | 0 |
{-# LANGUAGE GADTs,Trustworthy #-}
module Datatypes where
import qualified Data.Matrix as M
import qualified Numeric.LinearAlgebra.Data as LAD
import Data.Hashable
type ModulusTensor = Int -> Int -> Int -> Int -> Double
type Strain = M.Matrix Double
type Stress = Int -> Int -> Double
class Property a where
value ... | chiraag-nataraj/HFEM | Datatypes.hs | gpl-3.0 | 2,304 | 0 | 10 | 473 | 822 | 477 | 345 | -1 | -1 |
-- Copyright (C) 2017 Jonathan W. Armond
module Loco.Error where
import Control.Monad.Except
type LocoEval = Either LocoError
data LocoError = ArgError Int Int
| TypeError String
| ParserError String
| UndeclaredVarError String
| InvalidLineError Integer
... | jarmond/locomotive-haskell | src/Loco/Error.hs | gpl-3.0 | 1,622 | 0 | 9 | 357 | 546 | 274 | 272 | 36 | 1 |
module ATP.Prop
( eval
, atoms
, apply
, distrib
, simplify
, simplify1
, onallvaluations
, dual
, truthtable
, unsatisfiable
, satisfiable
, trivial
, tautology
, occurrences
, subsume
, nnf
, nenf
, simpcnf
, cnf
, purecnf
, purednf
, simpdnf
, dnf
-- * Testing
, ... | andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Prop.hs | gpl-3.0 | 10,023 | 564 | 12 | 3,150 | 4,539 | 2,421 | 2,118 | -1 | -1 |
{-# LANGUAGE Arrows #-}
module FRP.Events (
SDLEvents,
getSDLEvents,
sdlKeyPresses,
sdlKeys,
sdlAllKeys,
sdlKeyIsDown,
sdlMousePos,
sdlMouseIsDown,
sdlMouseClicks,
sdlQuitEvents,
kEqIgn, mkKey
) where
import Control.Applicative
import Control.Arrow
import Control.Monad.Loops
import Data.List
import Data.Ma... | CLowcay/CC_Clones | src/FRP/Events.hs | gpl-3.0 | 3,136 | 37 | 12 | 614 | 1,345 | 717 | 628 | 85 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.